package com.example.h1nson.photoshare;
import android.support.v7.app.ActionBarActivity;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TextView;

public class ThirdActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {  
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_picture_log);
        // 获取TabHost对象
        TabHost tabHost = (TabHost) findViewById(R.id.tabhost);
        // 如果没有继承TabActivity时，通过该种方法加载启动tabHost
        tabHost.setup();
        tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("关注").setContent(
                R.id.view1));

        tabHost.addTab(tabHost.newTabSpec("tab3").setIndicator("@你")
                .setContent(R.id.view2));

    }  
 
}  